#!/bin/bash
###SHELLPACK preamble sysjitter-bench 1.3

###SHELLPACK parseargBegin
###SHELLPACK parseargInstall
###SHELLPACK parseargParam --duration           DURATION
###SHELLPACK parseargParam --threshold		THRESHOLD
###SHELLPACK parseargEnd
###SHELLPACK monitor_hooks

###SHELLPACK check_install_required sysjitter-${VERSION}
###SHELLPACK init_complete

cd $SHELLPACK_SOURCES/sysjitter-${VERSION}-installed

mmtests_activity sysjitter
sync
monitor_pre_hook $LOGDIR_RESULTS $P
echo Running sysjitter for $DURATION seconds, min_threshold $THRESHOLD
./sysjitter --runtime $DURATION $THRESHOLD 2>&1 | tee $LOGDIR_RESULTS/sysjitter.log
monitor_post_hook $LOGDIR_RESULTS $P

exit $SHELLPACK_SUCCESS
